import $ from 'jquery'
export default{
    machineList(){
		return [
			{ "lot": "", "status": "Running", "machstatus": "Stopped", "reason": "", "dur": 62713, "station": "Production", "location": "", "machine": "GTW6-01", "machineorder": 1, "oem": "三菱", "model": "三菱镭射钻机", "job": "", "customer": "", "leadlist": null, "oplist": null, "lead": "", "op": "", "product": "", "quantity": 60, "produced": 60, "wasted": 0, "wastedQC": 0, "wastedMach": 0, "expstart": "", "t_start": "0001-01-01T00:00:00Z", "start": "", "expend": "", "fixedexpend": "", "t_end": "0001-01-01T00:00:00Z", "end": "", "pending_end": "", "last": "", "var1": "", "var2": "", "var3": "", "var4": "", "var5": "", "var6": "", "var7": "", "equip": { "process": "", "mold": { "id": "", "name": "" }, "peripheral": null }, "isSide": false, "isFinal": false, "overridenby": "", "override": null, "salesorder": "", "batchid": "", "productmodel": "", "productname": "", "tag": "", "tagorder": "", "notconnected": false, "remark": "" },
			{ "lot": "", "status": "Idle", "machstatus": "Stopped", "reason": "", "dur": 62713, "station": "Production", "location": "", "machine": "DI曝光机", "machineorder": 2, "oem": "网屏", "model": "DI曝光机", "job": "", "customer": "", "leadlist": null, "oplist": null, "lead": "", "op": "", "product": "", "quantity": 60, "produced": 1, "wasted": 0, "wastedQC": 0, "wastedMach": 0, "expstart": "", "t_start": "0001-01-01T00:00:00Z", "start": "", "expend": "", "fixedexpend": "", "t_end": "0001-01-01T00:00:00Z", "end": "", "pending_end": "", "last": "", "var1": "", "var2": "", "var3": "", "var4": "", "var5": "", "var6": "", "var7": "", "equip": { "process": "", "mold": { "id": "", "name": "" }, "peripheral": null }, "isSide": false, "isFinal": false, "overridenby": "", "override": null, "salesorder": "", "batchid": "", "productmodel": "", "productname": "", "tag": "", "tagorder": "", "notconnected": false, "remark": "" },
			{ "lot": "", "status": "Paused", "machstatus": "Stopped", "reason": "", "dur": 62713, "station": "Production", "location": "", "machine": "x光钻靶机", "machineorder": 3, "oem": "Pluritec", "model": "x光钻靶机", "job": "", "customer": "", "leadlist": null, "oplist": null, "lead": "", "op": "", "product": "", "quantity": 60, "produced": 5, "wasted": 0, "wastedQC": 0, "wastedMach": 0, "expstart": "", "t_start": "0001-01-01T00:00:00Z", "start": "", "expend": "", "fixedexpend": "", "t_end": "0001-01-01T00:00:00Z", "end": "", "pending_end": "", "last": "", "var1": "", "var2": "", "var3": "", "var4": "", "var5": "", "var6": "", "var7": "", "equip": { "process": "", "mold": { "id": "", "name": "" }, "peripheral": null }, "isSide": false, "isFinal": false, "overridenby": "", "override": null, "salesorder": "", "batchid": "", "productmodel": "", "productname": "", "tag": "", "tagorder": "", "notconnected": false, "remark": "" }]
	},
    getScreenWidth(){
        return screen.width
    },
    getScreenHeight(){
        return screen.height
    },
    setplayState(className,action){
        $(className).css('animation-play-state',action)
        $(className+'s').css('animation-play-state',action)
    },
    hoverAction(hoverclassname,classname){
        let that = this
        $(hoverclassname).hover(function(){
            that.setplayState(classname,'paused')
        },function(){
            that.setplayState(classname,'running')
        });
    },
    random(min: number, max: number) {
        return Math.floor(Math.random() * (max - min + 1)) + min;
    },
    formatter(num) {
        return (Array(2).join("0") + num).slice(-2);
    },

}